home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / cat.3 / GetGC.3 < prev    next >
Encoding:
Text File  |  1995-07-26  |  5.8 KB  |  133 lines

  1.  
  2.  
  3.  
  4.      TTTTkkkk____GGGGeeeettttGGGGCCCC((((3333))))                  TTTTkkkk (((( ))))                   TTTTkkkk____GGGGeeeettttGGGGCCCC((((3333))))
  5.  
  6.  
  7.  
  8.      _________________________________________________________________
  9.  
  10.      NNNNAAAAMMMMEEEE
  11.           Tk_GetGC,  Tk_FreeGC  -  maintain  database   of   read-only
  12.           graphics contexts
  13.  
  14.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  15.           ####iiiinnnncccclllluuuuddddeeee <<<<ttttkkkk....hhhh>>>>
  16.  
  17.           GC
  18.           TTTTkkkk____GGGGeeeettttGGGGCCCC(_t_k_w_i_n, _v_a_l_u_e_M_a_s_k, _v_a_l_u_e_P_t_r)
  19.  
  20.           TTTTkkkk____FFFFrrrreeeeeeeeGGGGCCCC((((_d_i_s_p_l_a_y, _g_c)                                        |
  21.  
  22.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  23.           Tk_Window       _t_k_w_i_n       (in)      Token  for  window  in
  24.                                                 which   the   graphics
  25.                                                 context will be used.
  26.  
  27.           unsigned long   _v_a_l_u_e_M_a_s_k   (in)      Mask of bits (such  as
  28.                                                 GGGGCCCCFFFFoooorrrreeeeggggrrrroooouuuunnnndddd        or
  29.                                                 GGGGCCCCSSSSttttiiiipppppppplllleeee)  indicating
  30.                                                 which     fields    of
  31.                                                 *_v_a_l_u_e_P_t_r are valid.
  32.  
  33.           XGCValues       *_v_a_l_u_e_P_t_r   (in)      Pointer  to  structure
  34.                                                 describing the desired
  35.                                                 values     for     the
  36.                                                 graphics context.
  37.  
  38.           Display         *_d_i_s_p_l_a_y    (in)      Display for  which  _g_c
  39.                                                 was allocated.          |
  40.  
  41.           GC              _g_c          (in)      X    identifier    for
  42.                                                 graphics  context that
  43.                                                 is no  longer  needed.
  44.                                                 Must     have     been
  45.                                                 allocated by TTTTkkkk____GGGGeeeettttGGGGCCCC.
  46.      _________________________________________________________________
  47.  
  48.  
  49.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  50.           TTTTkkkk____GGGGeeeettttGGGGCCCC and  TTTTkkkk____FFFFrrrreeeeeeeeGGGGCCCC  manage  a  collection  of  graphics
  51.           contexts being used by an application.  The procedures allow
  52.           graphics contexts to be shared, thereby avoiding the  server
  53.           overhead  that  would  be  incurred  if  a  separate GC were
  54.           created for each use.  TTTTkkkk____GGGGeeeettttGGGGCCCC takes  arguments  describing
  55.           the desired graphics context and returns an X identifier for
  56.           a GC that fits the description.  The graphics  context  that
  57.           is  returned  will  have default values in all of the fields
  58.           not specified explicitly by _v_a_l_u_e_M_a_s_k and _v_a_l_u_e_P_t_r.
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 7/23/95)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      TTTTkkkk____GGGGeeeettttGGGGCCCC((((3333))))                  TTTTkkkk (((( ))))                   TTTTkkkk____GGGGeeeettttGGGGCCCC((((3333))))
  71.  
  72.  
  73.  
  74.           TTTTkkkk____GGGGeeeettttGGGGCCCC maintains a database of all the  graphics  contexts
  75.           it  has created.  Whenever possible, a call to TTTTkkkk____GGGGeeeettttGGGGCCCC will
  76.           return an existing graphics context rather than  creating  a
  77.           new  one.   This  approach  can  substantially reduce server
  78.           overhead, so TTTTkkkk____GGGGeeeettttGGGGCCCC should generally be used in preference
  79.           to  the  Xlib  procedure  XXXXCCCCrrrreeeeaaaatttteeeeGGGGCCCC,  which  creates  a  new
  80.           graphics context on each call.
  81.  
  82.           Since the return values  of  TTTTkkkk____GGGGeeeettttGGGGCCCC  are  shared,  callers
  83.           should  never  modify  the  graphics  contexts  returned  by
  84.           TTTTkkkk____GGGGeeeettttGGGGCCCC.   If  a  graphics   context   must   be   modified
  85.           dynamically,  then it should be created by calling XXXXCCCCrrrreeeeaaaatttteeeeGGGGCCCC
  86.           instead of TTTTkkkk____GGGGeeeettttGGGGCCCC.
  87.  
  88.           When a graphics  context  is  no  longer  needed,  TTTTkkkk____FFFFrrrreeeeeeeeGGGGCCCC
  89.           should be called to release it.  There should be exactly one
  90.           call to  TTTTkkkk____FFFFrrrreeeeeeeeGGGGCCCC  for  each  call  to  TTTTkkkk____GGGGeeeettttGGGGCCCC.   When  a
  91.           graphics  context  is no longer in use anywhere (i.e. it has
  92.           been freed as many times as it has  been  gotten)  TTTTkkkk____FFFFrrrreeeeeeeeGGGGCCCC
  93.           will  release  it  to  the  X  server and delete it from the
  94.           database.
  95.  
  96.  
  97.      KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  98.           graphics context
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 7/23/95)
  130.  
  131.  
  132.  
  133.